<form name="form" action="?module=backoffice&action=AjaxSaveBlockParams" method="POST" class="nyroModal">
{include file="$MODULES_DIR/backoffice/templates/block/modal/ModalTitle.html" title=$blockParams.blockLabel}
    <div id="modalContent">
        <div id="modalTabs">
        <ul>
            <li><a class="selected" href="#" title="{t}Content{/t}" rel="tab1"><span>{t}Content{/t}</span></a></li>
            <li><a href="#" title="{t}Properties{/t}" rel="tab2"><span>{t}Properties{/t}</span></a></li>
            <li><a href="#" title="{t}Skinning{/t}" rel="tab3"><span>{t}Skinning{/t}</span></a></li>
        </ul>
        </div>
        <div id="tab1" class="modalTab">
            <table class="listTable">
                <tr>
                    {if count($pages) > 0}
                    <td style="width:16px;">
                        {t assignTo=iconTitle}Help - You must target a page with the Home News, and put a configurate block news on it. If you don't have any page with a block news, this block will take the folder parameter.{/t}
                        {icon name="help.png" class="toolTip icon16" title="$iconTitle"}
                    </td>
                    <td>
                        {t}Select news page{/t}
                    </td>
                    <td>
                        <select name="form[pageNewsId]">
                            <option value="">{t}No page{/t}</option>
                        {foreach from=$pages item=page}
                            <option value="{$page->getUniqueId()}" {if isset($blockParams.pageNewsId) && $page->getUniqueId() == $blockParams.pageNewsId}selected="selected"{/if}>{$page->getUniqueId()} - {$page->getLabel()}</option>
                        {/foreach}
                        </select>
                    </td>
                    {else}
                    <td colspan="3">{icon name="warning.png"} {t}You don't have a page with the block "Articles", this will disable the link "read more".{/t}</td>
                    {/if}
                </tr>
                <tr>
                    <td style="width:16px;">
                        {t assignTo=iconTitle}Help - If you don't have any news page, you can select a fodler news. If any folder is selected, the block will display all news.{/t}
                        {icon name="help.png" class="toolTip icon16" title="$iconTitle"}
                    </td>
                    <td>{t}Select news folder{/t}</td>
                    <td>
                        <select name="form[folderId]">
                            <option value="">{t}No folder{/t}</option>
                        {foreach from=$folders item=folder}
                            <option value="{$folder[0]}" {$folder[2]}>{$folder[1]}</option>
                        {/foreach}
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Block title{/t}</td>
                    <td><input type="text" value="{if isset($blockParams.blockTitle)}{$blockParams.blockTitle}{/if}" name="form[blockTitle]" /></td>
                </tr>
            </table>
        </div>
        <div id="tab2" style="display:none" class="modalTab">
             <table class="listTable">
                <tr>
                    <td></td>
                    <td>{t}Display Title{/t}</td>
                    <td>
                        <select name="form[displayTitle]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayTitle}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Subtitle{/t}</td>
                    <td>
                        <select name="form[displaySubTitle]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displaySubTitle}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Header{/t}</td>
                    <td>
                        <select name="form[displayHeader]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayHeader}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Date{/t}</td>
                    <td>
                        <select name="form[displayDate]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayDate}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display Author{/t}</td>
                    <td>
                        <select name="form[displayAuthor]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayAuthor}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Number of news{/t}</td>
                    <td>
                        <select name="form[limit]">
                            <option value="0">{t}All{/t}</option>
                            {section name=loop start=1 loop=11}
                            {if $smarty.section.loop.index == $blockParams.limit}
                                <option selected="selected">{$smarty.section.loop.index}</option>
                            {else}
                                <option>{$smarty.section.loop.index}</option>
                            {/if}
                            {/section}
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display the link label{/t}</td>
                    <td>
                        <select name="form[displayLinkLabel]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !$blockParams.displayLinkLabel}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Set the link label text{/t}</td>
                    <td>
                        <input type="text" name="form[linkLabel]" value="{$blockParams.linkLabel}" class="medium" />
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Display the link All News{/t}</td>
                    <td>
                        <select name="form[displayLinkAllNews]">
                            <option value="1">{t}Yes{/t}</option>
                            <option value="0" {if !isset($blockParams.displayLinkAllNews) || !$blockParams.displayLinkAllNews}selected="selected"{/if}>{t}No{/t}</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td>{t}Set the link label text AllNews{/t}</td>
                    <td>
                        <input type="text" name="form[linkAllNews]" value="{$blockParams.linkAllNews}" class="medium" />
                    </td>
                </tr>
            </table>
        </div>
        <div id="tab3" style="display:none" class="modalTab">
            <div class="blockParamsSubmit">
                <input type="hidden" value="{$blockParams.blockId}" name="form[blockId]"/>
                <input type="hidden" value="{$blockParams.pageId}" name="form[pageId]"/>
                <input type="hidden" value="{$blockParams.pageLang}" name="form[pageLang]"/>
            </div>
            <table class="listTable">
                <tr>
                    {t assignTo=help}CSS class - You can define an additional css class to differ news blocks{/t}
                    <td style="width:16px;">
                        {icon name="help.png" class="toolTip icon16" title=$help}
                    </td>
                    <td>{t}Set the generic CSS class{/t}</td>
                    <td>
                        <input type="text" name="form[css]" value="{$blockParams.css}" class="medium" />
                    </td>
                </tr>
                <tr>
                    {t assignTo=help}Header - The length of displayed header in news list. The header is truncated by sentence. Default : 100{/t}
                    <td style="width:16px;">
                        {icon name="help.png" class="toolTip icon16" title=$help}
                    </td>
                    <td>{t}Header length{/t}</td>
                    <td>
                        <input type="text" name="form[headerLength]" value="{$blockParams.headerLength}" class="small" />
                    </td>
                </tr>
                <tr>
                    {t assignTo=help}Picture - Maximum size of the image in the news list. If the image is not properly formatted it will not be displayed.{/t}
                    <td style="width:16px;">
                        {icon name="help.png" class="toolTip icon16" title=$help}
                    </td>
                    <td>{t}Picture size in list{/t}</td>
                    <td>
                        <input type="text" name="form[picWidth]" value="{$blockParams.picWidth}" class="verySmall" /> /
                        <input type="text" name="form[picHeight]" value="{$blockParams.picHeight}" class="verySmall" /> px
                    </td>
                </tr>
            </table>
        </div>
    {include file="$MODULES_DIR/backoffice/templates/block/modal/ModalFooter.html"}
</form>